<?php
    $phonenum = $_GET['phonenum'];
    $goods_id = $_GET['goods_id'];
    $goods_num = $_GET['goods_num'];

    $con = mysqli_connect('localhost','root','123456','hua');

    $sql = "UPDATE `cart` SET `goods_num` = ' $goods_num' WHERE `goods_id` = '$goods_id' AND `phonenum` = '$phonenum'";

    $res = mysqli_query($con,$sql);

    if(!$res){
        echo json_encode(array("code"=>$res,"msg"=>"修改数据失败"),JSON_UNESCAPED_UNICODE);
    }else{
        echo json_encode(array("code"=>$res,"msg"=>"修改数据成功"),JSON_UNESCAPED_UNICODE);
    }
?>